In [1]:
include("testRRTstar.jl")
main()
Out[1]:
In [3]:
include("testRRT.jl")
main()
In [ ]:
a= Point(1,2)
b = Point(4,5)
min_euclidean(Vec(a),Vec(b))
In [ ]:
mutable struct edge
startID
endID
end
mutable struct gnode
id
parentid
state
cost
#tnode() = (a= new(); a.state = -1; a.cost = 99999)
gnode() = new()
end
a = edge(1,2)
b = edge(2,3)
c = edge(6,5)
foo = [a, b, c]
foo = Vector{edge}()
push!(foo, a, b,c)
d = edge(1,1)
e = edge(6,5)
Base.isequal(q1::edge, q2::edge) = q1.startID == q2.startID && q1.endID == q2.endID
#Base.==(q1::edge, q2::edge) = q1.startID == q2.startID && q1.endID == q2.endID
findin(foo, [e])
i = findfirst(foo) do y
y.startID == e.startID && y.endID == e.endID
end
deleteat!(foo, i)
foo
for i in foo
i.startID = 1
end
foo
a = gnode(); a.id = 2; a.parentid =3;
a
typeof(a)
mutable struct Node2 id cost end
a= Node2(1,2) a.id
findfirst(y -> y > 7, x)v
myfilter(y) = y > 2
milter = y-> Y > 2
(y -> y > 2).(x)
first argument by convention
findfirst(x) do y
z = y+2
z > 2
end
returns 0 if not work